package lab01;

public class test13 {
    public static void main(String[] args) {
        System.out.println("输出1到1000的所有水仙花数");
        for (int i = 1; i < 1000; i++) {
            int a = i / 100;
            int b = (i - a * 100) / 10;
            int c = i - a * 100 - b * 10;
            if (a * a * a + b * b * b + c * c * c == i) {
                System.out.println(i);
            }
        }

    }
}